/**
 * @version v1.0
 * @Description
 * @Author admin
 * @date 2021/7/7  15:23
 * @Copyright
 */
public class dowhlieDome {
    public static void main(String[] args) {
        /*
        * do{
        * 执行语句；
        * }while()
        *
        * */

        //1234，计算计算各位数字之和
        int a=1234;
        int sum=0;

        do{
            int b=a%10;
            a=a/10;
            sum+=b;

        }while (a!=0);
        System.out.println(sum);
    }
}
